package io.buffered;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

public class Demo03BufferedReader {
    public static void main(String[] args) throws Exception {
//        File file = new File("F://Test//T1//d.txt");
//        FileReader fileReader = new FileReader(file);
//        BufferedReader br = new BufferedReader(fileReader);
//        BufferedReader br = new BufferedReader(fileReader,1024);

        BufferedReader br = new BufferedReader(new FileReader(new File("F://Test//T1//d.txt")), 102400);

        char[] chars = new char[1024];
        int length = 0;
        while ((length = br.read(chars)) != -1) {
            System.out.println(new String(chars, 0, length));
        }

        String s = br.readLine();
        System.out.println(s);
    }
}
